<?php echo $this->fetch('member.header.html'); ?>
<script type="text/javascript">
$(function(){
    $('#email_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('validate_right').text('OK!');
        },
        rules : {
           email : {
                required   : true,
                email      : true
            }
        },
        messages : {
            email : {
                required   : '必须正确填写您的电子邮箱',
                email    : '这不是一个有效的电子邮箱'
            }
        }
    });
});
</script>
<style>
.tip-faq{margin:40px 0; border-top:#f2f2f2 1px solid; padding:10px 0}
.tip-faq h3{line-height:30px; font-size:12px;}
.tip-faq dl{color:#4d4d4d;}
.tip-faq dd{padding-left:15px; color:#666}
.tip-faq a{color:#07f; text-decoration:none}.tip-faq a:hover{color:#F00; text-decoration:underline}
.enter_lcj{background:url(/themes/default/styles/images/barbtn.gif); width:190px; height:26px; line-height:23px; display:block; font-size:13px; text-align:center; color:#FFF; text-decoration:none}
a.enter_lcj:hover{text-decoration:underline}
</style>
<div class="content_color">
<div class="content">
    <?php echo $this->fetch('member.menu.html'); ?>
    <div id="right">
    <?php echo $this->fetch('member.submenu.html'); ?>
    <div class="wrap">
        <div class="eject_con">
        <div class="add">
        <?php if ($this->_var['send_mail_ok'] == 'ok'): ?>
        <script language="javascript" type="text/javascript">
        //知名邮件服务地址
        var famous_mail_suffix = new Array('163.com','qq.com','tom.com',
                                                            'sohu.com','126.com','sina.com',
                                                            'sogou.com','hotmail.com','live.com',
                                                            'live.cn','189.cn','foxmail.com',
                                                            'yahoo.com','yahoo.cn','yeah.net',
                                                            'wo.com.cn','263.net','21cn.com',
                                                            'eyou.com','188.com','139.com',
                                                            'gmail.com');
        var famous_mail_servers = new Array('mail.163.com',	'mail.qq.com','mail.tom.com',
                                                            'mail.sohu.com','www.126.com','sina.com.cn',
                                                            'mail.sogou.com','www.hotmail.com','www.hotmail.com',
                                                            'www.hotmail.com','www.189.cn','www.foxmail.com',
                                                            'mail.cn.yahoo.com','mail.cn.yahoo.com','www.yeah.net',
                                                            'mail.wo.com.cn','www.263.net','mail.21cn.com',
                                                            'www.eyou.com','www.188.com','mail.10086.cn',
                                                            'gmail.google.com');
        var email = '<?php echo $this->_var['new_email']; ?>';
        var email_server = '';
        var email_http = '';
        for (x in famous_mail_suffix)
        {
            var search_temp = '@' + famous_mail_suffix[x];
            var search_temp_2 = '.' + famous_mail_suffix[x];
            if(email.indexOf(search_temp) > 0 || email.indexOf(search_temp_2) > 0) {
              email_server = famous_mail_suffix[x];
                email_http = 'http://' + famous_mail_servers[x];
                break;
            }
        }
        </script>                
      <div style="font-size:14px;">我们已经向您的 <?php echo $this->_var['new_email']; ?> 邮件发送了一封验证邮件，请前往收信，完成验证。</div><br /><br />
	  <script type="text/javascript">
      if(email_server != '') {
        document.write('<a href="' + email_http +'" target="_blank" class="enter_lcj">前往' + email_server + ' 收信</a>');
      }	
      </script>             
        <?php else: ?>
        <div style="height:40px; font-size:14px;color:#f00;overflow:hidden">当前您的邮箱<?php echo $this->_var['member_email']; ?>，请填写新的邮箱地址，我们将为您重新发送验证邮件！</div>
        <form method="post" id="email_form">
            <ul>
                <li><h3>新的Email地址:</h3>
                <p><input class="text width_normal" type="text" name="email" /></p>
                </li>
            </ul>
            <div class="submit">
               <input class="submit_btn" type="submit" value="发送验证邮件" />
            </div>
        </form>        
        <?php endif; ?>
      <div class="tip-faq">
        <h3>邮箱没有收到邮件怎么办？</h3>
        <dl>
          <dd>1、查看邮箱的垃圾箱或广告箱，邮件可能被误认为垃圾邮件。 </dd>
          <dd>2、如果超过10分钟仍未收到验证邮件，请点击重新发送验证邮件。</dd>
          <dd>3、如果再次发送验证邮件您仍未收到，请更换邮箱重新发送。</dd>
          <dd>3、请点击，<a href="<?php echo url('app=article&act=abouts&code=contactus'); ?>" target="_blank">联系我们</a>。</dd>
        </dl>  
        </div>                 
        </div>
     </div>
    </div>
   </div>
   <div class="clear"></div>
</div>
</div>
<?php echo $this->fetch('footer_member.html'); ?>